#include<iostream>
using namespace std;
int main()
{
	int a[105];
	int t,i=0;
	while (scanf("%d",&t) == 1)
	{
		a[i++]=t;
		if (getchar() == '\n')
			break;
	}
	int x = i;
	for (int j = x-1 ; j >= 0; --j)
	{
		cout << a[j] << " ";
	}
	return 0;
}